package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.fivehero.FiveHeroUserData;
import com.yanqu.road.entity.activity.fivehero.config.*;
import com.yanqu.road.entity.activity.fivehero.cross.*;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class FiveHeroBusiness {

    public static FiveHeroUserData getUserData(long userId, int activityId) {
        return DaoHelper.getFiveHeroUserDataDaoImpl().getUserData(activityId, userId);
    }


    public static boolean addUserData(FiveHeroUserData userData) {
        return DaoHelper.getFiveHeroUserDataDaoImpl().add(userData);
    }

    public static boolean updateUserData(FiveHeroUserData userData) {
        return DaoHelper.getFiveHeroUserDataDaoImpl().update(userData);
    }

    //跨服的在这：”：L":L":L":L:"L"
    public static CrossFiveHeroData getCrossFiveHeroData(int activityId,int groupId) {
        return DaoHelper.getCrossFiveHeroDataDaoImpl().getCrossFiveHeroData(activityId,groupId);
    }
    public static boolean addCrossFiveHeroData(CrossFiveHeroData data) {
        return DaoHelper.getCrossFiveHeroDataDaoImpl().add(data);
    }
    public static boolean updateCrossFiveHeroData(CrossFiveHeroData data) {
        return DaoHelper.getCrossFiveHeroDataDaoImpl().update(data);
    }

    public static Map<Integer,CrossFiveHeroMatchData> getCrossFiveHeroMatchData(int activityId,int groupId) {
        return DaoHelper.getCrossFiveHeroMatchDataDaoImpl().getCrossFiveHeroMatchData(activityId,groupId);
    }
    public static boolean addCrossFiveHeroMatchData(CrossFiveHeroMatchData data) {
        return DaoHelper.getCrossFiveHeroMatchDataDaoImpl().add(data);
    }
    public static boolean updateCrossFiveHeroMatchData(CrossFiveHeroMatchData data) {
        return DaoHelper.getCrossFiveHeroMatchDataDaoImpl().update(data);
    }

    public static Map<String, CrossFiveHeroUnion> getCrossFiveHeroUnionData(int activityId,int groupId) {
        return DaoHelper.getCrossFiveHeroUnionDaoImpl().getCrossFiveHeroUnion(activityId,groupId);
    }
    public static boolean addCrossFiveHeroUnionData(CrossFiveHeroUnion data) {
        return DaoHelper.getCrossFiveHeroUnionDaoImpl().add(data);
    }
    public static boolean updateCrossFiveHeroUnionData(CrossFiveHeroUnion data) {
        return DaoHelper.getCrossFiveHeroUnionDaoImpl().update(data);
    }

    public static Map<Long, CrossFiveHeroUserData> getCrossUserDataMap(int activityId,int groupId) {
        return DaoHelper.getCrossFiveHeroDaoImpl().getUserDataMap(activityId,groupId);
    }
    public static void addCrossUserDataList(List<CrossFiveHeroUserData> insertList) {
        DaoHelper.getCrossFiveHeroDaoImpl().addUserDataList(insertList);
    }

    public static void updateCrossUserDataList(List<CrossFiveHeroUserData> updateList) {
        DaoHelper.getCrossFiveHeroDaoImpl().updateUserDataList(updateList);
    }

    public static Map<Long, Map<Integer,CrossFiveHeroPatrons>> getCrossPatronsDataMap(int activityId,int groupId) {
        return DaoHelper.getCrossFiveHeroDaoImpl().getPatronsDataMap(activityId,groupId);
    }

    public static void addCrossPatronsDataList(List<CrossFiveHeroPatrons> insertList) {
        DaoHelper.getCrossFiveHeroDaoImpl().addPatronsDataList(insertList);
    }

    public static void updateCrossPatronsDataList(List<CrossFiveHeroPatrons> updateList) {
        DaoHelper.getCrossFiveHeroDaoImpl().updatePatronsDataList(updateList);
    }


    public static Map<String, Map<Integer, CrossFiveHeroBookData>> getCrossBookDataMap(int activityId,int groupId) {
        return DaoHelper.getCrossFiveHeroDaoImpl().getBookDataMap(activityId,groupId);
    }

    public static void addCrossBookDataList(List<CrossFiveHeroBookData> insertList) {
        DaoHelper.getCrossFiveHeroDaoImpl().addBookDataList(insertList);
    }

    public static void updateCrossBookDataList(List<CrossFiveHeroBookData> updateList) {
        DaoHelper.getCrossFiveHeroDaoImpl().updateBookDataList(updateList);
    }


    public static Map<Integer, CrossFiveHeroCity> getCrossCityDataMap(int activityId,int groupId) {
        return DaoHelper.getCrossFiveHeroDaoImpl().getCityDataMap(activityId,groupId);
    }

    public static void addCrossCityDataList(List<CrossFiveHeroCity> insertList) {
        DaoHelper.getCrossFiveHeroDaoImpl().addCityDataList(insertList);
    }

    public static void updateCrossCityDataListNoPatrons(List<CrossFiveHeroCity> updateList) {
        DaoHelper.getCrossFiveHeroDaoImpl().updateCityDataListNoPatrons(updateList);
    }

    public static void updateCrossCityDataList(List<CrossFiveHeroCity> updateList) {
        DaoHelper.getCrossFiveHeroDaoImpl().updateCityDataList(updateList);
    }

    public static Map<Long,List<CrossFiveHeroUserReport>> getCrossUserReportDataMap(int activityId,int num,int groupId) {
        return DaoHelper.getCrossFiveHeroDaoImpl().getUserReportDataMap(activityId,num,groupId);
    }

    public static void addCrossUserReportDataList(List<CrossFiveHeroUserReport> insertList) {
        DaoHelper.getCrossFiveHeroDaoImpl().addUserReportDataList(insertList);
    }

    public static List<CrossFiveHeroCityReport> getCrossCityReportDataMap(int activityId,int num,int groupId,int luoyangCityId) {
        return DaoHelper.getCrossFiveHeroDaoImpl().getCityReportDataMap(activityId,num,groupId,luoyangCityId,false);
    }
    public static List<CrossFiveHeroCityReport> getCrossCityLuoYangReportDataMap(int activityId,int num,int groupId,int luoyangCityId) {
        return DaoHelper.getCrossFiveHeroDaoImpl().getCityReportDataMap(activityId,num,groupId,luoyangCityId,true);
    }

    public static void addCrossCityReportDataList(List<CrossFiveHeroCityReport> insertList) {
        DaoHelper.getCrossFiveHeroDaoImpl().addCityReportDataList(insertList);
    }

    public static void addCrossRankDataList(List<CrossFiveHeroRank> insertList) {
        DaoHelper.getCrossFiveHeroDaoImpl().addRankDataList(insertList);
    }

    //配置
    public static Map<Integer, FiveHeroTypeConfig> getTypeConfigMap(int activityId) {
        return DaoHelper.getFiveHeroConfigDaoImpl().getTypeConfigMap(activityId);
    }

    public static Map<Integer, FiveHeroCityConfig> getCityConfigMap(int activityId) {
        return DaoHelper.getFiveHeroConfigDaoImpl().getCityConfigMap(activityId);
    }

    public static Map<Integer, FiveHeroBuffConfig> getBuffConfigMap(int activityId) {
        return DaoHelper.getFiveHeroConfigDaoImpl().getBuffConfigMap(activityId);
    }

    public static Map<Integer, FiveHeroEventConfig> getEventConfigMap(int activityId) {
        return DaoHelper.getFiveHeroConfigDaoImpl().getEventConfigMap(activityId);
    }

    public static Map<Integer, FiveHeroBookConfig> getBookConfigMap(int activityId) {
        return DaoHelper.getFiveHeroConfigDaoImpl().getBookConfigMap(activityId);
    }

    public static Map<Integer, FiveHeroBanditConfig> getBanditConfigMap(int activityId) {
        return DaoHelper.getFiveHeroConfigDaoImpl().getBanditConfigMap(activityId);
    }

    public static Map<Integer, FiveHeroTechConfig> getTechConfigMap(int activityId) {
        return DaoHelper.getFiveHeroConfigDaoImpl().getTechConfigMap(activityId);
    }

    public static Map<Integer, FiveHeroOrderConfig> getOrderConfigMap(int activityId) {
        return DaoHelper.getFiveHeroConfigDaoImpl().getOrderConfigMap(activityId);
    }

    public static Map<Integer, FiveHeroTitleConfig> getTitleConfigMap(int activityId) {
        return DaoHelper.getFiveHeroConfigDaoImpl().getTitleConfigMap(activityId);
    }
}
